package com.skylink.gaea.jdbc.uid;

import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
import com.skylink.gaea.leaf.IDGen;
import com.skylink.gaea.leaf.snowflake.StandaloneSnowflakeID;

/**
 * @author zeno
 */
public final class StandaloneUidGenerator implements IdentifierGenerator{

  private static final IDGen ID_GEN = new StandaloneSnowflakeID();

  /**
   * 生成Id
   *
   * @param entity 实体
   *
   * @return id
   */
  @Override
  public Number nextId( Object entity ){
    return ID_GEN.nextId();
  }
}
